﻿<metro:Window x:Class="WoblaExplorer.Windows.PropertiesWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WoblaExplorer"
        xmlns:metro="http://schemas.codeplex.com/elysium"
        xmlns:params="http://schemas.codeplex.com/elysium/params"
        mc:Ignorable="d" FontFamily="{StaticResource FontAwesome}"
        Title="{DynamicResource PwTitle}" Height="400" Width="400"
        MaxHeight="400" MaxWidth="400" MinHeight="400" MinWidth="400" Name="PropertiesWindowX">
    <Window.CommandBindings>
        <CommandBinding Command="Copy" Executed="CopyExecuted" CanExecute="DefaultCommandsCanExecute"></CommandBinding>
    </Window.CommandBindings>
    
    <Window.Resources>
        <Style TargetType="Label" BasedOn="{StaticResource {x:Type Label}}">
            <Setter Property="Foreground" Value="{Binding ElementName=PropertiesWindowX, Path=GetCurrentContrastBrush}"></Setter>
        </Style>
    </Window.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto" ></RowDefinition>
        </Grid.RowDefinitions>
        
        <Grid Grid.Row="0">
            <Border BorderBrush="Black" Margin="2" BorderThickness="1">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
                    <Label Content="{DynamicResource PwFileNameLabel}" VerticalAlignment="Center"></Label>
                    <TextBlock Name="TbFileName" HorizontalAlignment="Stretch" VerticalAlignment="Center" Focusable="True">
                        <TextBlock.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="{DynamicResource PwContextMenuCopy}" Command="Copy" CommandTarget="{Binding Path=PlacementTarget,
                                    RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ContextMenu}}}"></MenuItem>
                            </ContextMenu>
                        </TextBlock.ContextMenu>
                    </TextBlock>
                </StackPanel>
            </Border>
        </Grid>

        <Grid Grid.Row="1">
            <Border BorderBrush="Black" Margin="2" BorderThickness="1">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
                    <Label Content="{DynamicResource PwFilePathLabel}" VerticalAlignment="Center"></Label>
                    <TextBlock Name="TbFilePath" HorizontalAlignment="Stretch" VerticalAlignment="Center" Focusable="True">
                        <TextBlock.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="{DynamicResource PwContextMenuCopy}" Command="Copy" CommandTarget="{Binding Path=PlacementTarget,
                                    RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ContextMenu}}}"></MenuItem>
                            </ContextMenu>
                        </TextBlock.ContextMenu>
                    </TextBlock>
                </StackPanel>
            </Border>
        </Grid>
        
        <Grid Grid.Row="2">
            <Border BorderBrush="Black" Margin="2" BorderThickness="1">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
                    <Label Content="{DynamicResource PwFileExtensionLabel}" VerticalAlignment="Center"></Label>
                    <TextBlock Name="TbFileExtension" HorizontalAlignment="Stretch" VerticalAlignment="Center"></TextBlock>
                </StackPanel>
            </Border>
        </Grid>

        <Grid Grid.Row="3">
            <Border BorderBrush="Black" Margin="2" BorderThickness="1">
                <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" Margin="2">
                        <Label Content="{DynamicResource PwFileSizeBytesLabel}" VerticalAlignment="Center"></Label>
                        <TextBlock Name="TbFileSizeBytes" HorizontalAlignment="Stretch" VerticalAlignment="Center"></TextBlock>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" Margin="2">
                        <Label Content="{DynamicResource PwFileSizeMbLabel}" VerticalAlignment="Center"></Label>
                        <TextBlock Name="TbFileSizeMb" HorizontalAlignment="Stretch" VerticalAlignment="Center"></TextBlock>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" Margin="2">
                        <Label Content="{DynamicResource PwFileSizeGbLabel}" VerticalAlignment="Center"></Label>
                        <TextBlock Name="TbFileSizeGb" HorizontalAlignment="Stretch" VerticalAlignment="Center"></TextBlock>
                    </StackPanel>
                </StackPanel>
            </Border>
        </Grid>

        <Grid Grid.Row="4">
            <Border BorderBrush="Black" Margin="2" BorderThickness="1" Name="MultipleFilesPanel" Visibility="Hidden">
                <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch">
                    <StackPanel Orientation="Horizontal" Margin="2">
                        <Label Content="{DynamicResource PwFilesCountLabel}" VerticalAlignment="Center"></Label>
                        <TextBlock Name="TbFilesCount" VerticalAlignment="Center"></TextBlock>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="2">
                        <Label Content="{DynamicResource PwDirsCountLabel}" VerticalAlignment="Center"></Label>
                        <TextBlock Name="TbDirsCount" VerticalAlignment="Center"></TextBlock>
                    </StackPanel>
                </StackPanel>
            </Border>
        </Grid>
        
        <Grid Grid.Row="5">
            <StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
                <metro:ProgressBar Name="MainProgressBar" Width="385" State="Indeterminate" Visibility="Hidden" VerticalAlignment="Bottom"/>
            </StackPanel>
        </Grid>
    </Grid>
</metro:Window>
